<html>
<head>
<title>
isDateFormat - Helma Javascript Reference
</title>

<meta http-equiv="Content-Script-Type" content="text/javascript">
<script src="scripts.js"></script>
<link rel="stylesheet" href="styles.css" media="screen" />
    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
    <script type="text/javascript">_uacct = "UA-737027-2";urchinTracker();</script>
<style>
td {
    font-family: "Trebuchet MS", sans-serif; 
    font-size: 13px; 
    line-height:135%;
}
.columnheight {
    height: 1350px;
}
</style>
</head>
<body bgcolor="white">

<div class="frame">

<img class="home" onclick="location='http://dev.helma.org/'" src="helmaheader.gif" /><br />
<div class="lead">
    <p>Detailed reference of prototypes, properties and methods available in the <br />
    Javascript environment of your Helma web applications.</p>
</div>

<script> openbox('content') </script>


    <div class="content">
        <div class="docs">
        
            <!--
            <div class="sectionHead">Library: String.js</div>
            -->
            <div class="section overview">
            <!--
                <div class="itemTitle">
                    Overview
                </div>
            -->
                <div>   
                    <div class="desc">Adds useful methods to the JavaScript String type.
<br /><br />
To use this optional module, its repository needs to be added to the 
application, for example by calling app.addRepository('modules/core/String.js')</div>
                    <div class="itemTags">
            <!--
                    <ul>
                        
                    
                    </ul>
            -->
                    </div>
                </div>
            </div>
            
            <!--
            <div class="sectionHead">Constructors</div>
            -->
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            <!--
            <div class="sectionHead">Namespaces</div>
            -->
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            <!--
            <div class="sectionHead">Properties</div>
            -->
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            

            <!--
            <div class="sectionHead">Constructors</div>
            -->
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            <div class="sectionHead">Methods</div>
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.isDateFormat"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">isDateFormat</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">checks if a date format pattern is correct</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Boolean true if the pattern is correct
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.toDate"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">toDate</span>(<span class="signature">String, Object</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">parse a timestamp into a date object. This is used when users
want to set createtime explicitly when creating/editing stories.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            date format to be applied
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Object
                        </td>
                        <td>
                            Java TimeZone Object (optional)
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Object contains the resulting date
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.isUrl"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">isUrl</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function checks if the string passed contains any characters that
are forbidden in URLs and tries to create a java.net.URL from it
FIXME: probably deprecated -> helma.Url</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Boolean
                        </td> 
                    </tr>
                
                </table>
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="helma.Url.html#helma.Url.PATTERN">helma.Url.PATTERN</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.isFileName"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">isFileName</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function checks if the string passed contains any characters
that are forbidden in image- or filenames</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Boolean
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.toFileName"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">toFileName</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function cleans the string passed as argument from any characters
that are forbidden or shouldn't be used in filenames</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Boolean
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.isHexColor"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">isHexColor</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function checks a string for a valid color value in hexadecimal format.
it may also contain # as first character</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Boolean false, if string length (without #) > 6 or < 6 or
             contains any character which is not a valid hex value
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.toHexColor"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">toHexColor</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">converts a string into a hexadecimal color
representation (e.g. "ffcc33"). also knows how to
convert a color string like "rgb (255, 204, 51)".</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String the resulting hex color (w/o "#")
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.isAlphanumeric"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">isAlphanumeric</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function returns true if the string contains
only a-z and 0-9 (case insensitive!)</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Boolean true in case string is alpha, false otherwise
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.toAlphanumeric"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">toAlphanumeric</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function cleans a string by throwing away all
non-alphanumeric characters</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            cleaned string
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.isAlpha"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">isAlpha</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function returns true if the string contains
only characters a-z</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Boolean true in case string is alpha, false otherwise
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.isNumeric"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">isNumeric</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function returns true if the string contains
only 0-9</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Boolean true in case string is numeric, false otherwise
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.capitalize"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">capitalize</span>(<span class="signature">Number</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">transforms the first n characters of a string to uppercase</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Number
                        </td>
                        <td>
                            amount of characters to transform
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String the resulting string
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.titleize"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">titleize</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">transforms the first n characters of each
word in a string to uppercase</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String the resulting string
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.entitize"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">entitize</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">translates all characters of a string into HTML entities</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String translated result
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.embody"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">embody</span>(<span class="signature">Number, String, String</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">breaks up a string into two parts called
head and tail at the given position
don't apply this to HTML, i.e. use stripTags() in advance</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Number
                        </td>
                        <td>
                            number of charactrers or of segments separated by the delimiter
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            pre-/suffix to be pre-/appended to shortened string
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            delimiter
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Object containing head and tail properties
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.head"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">head</span>(<span class="signature">limit, clipping, delimiter</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">get the head of a string</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            limit
                        </td>
                        <td>
                            
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            clipping
                        </td>
                        <td>
                            
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            delimiter
                        </td>
                        <td>
                            
                        </td> 
                    </tr>
                
                </table>
                
                
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="StringExtensions.html#String.embody()">String.prototype.embody()</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.tail"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">tail</span>(<span class="signature">limit, clipping, delimiter</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">get the tail of a string</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            limit
                        </td>
                        <td>
                            
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            clipping
                        </td>
                        <td>
                            
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            delimiter
                        </td>
                        <td>
                            
                        </td> 
                    </tr>
                
                </table>
                
                
                
                
                

                
                <div class="detailHead">see</div>
                <table class="params">
                
                    <tr><td class="type"><div class="see"><a href="StringExtensions.html#String.embody()">String.prototype.embody()</a></div></td></tr>
                
                </table>
                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.group"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">group</span>(<span class="signature">Int, String, Boolean</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function inserts a string every number of characters</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Int
                        </td>
                        <td>
                            number of characters after which insertion should take place
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            string to be inserted
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Boolean
                        </td>
                        <td>
                            definitely insert at each interval position
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String resulting string
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.unwrap"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">unwrap</span>(<span class="signature">Boolean, String</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">replace all linebreaks and optionally all w/br tags</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Boolean
                        </td>
                        <td>
                            flag indicating if html tags should be replaced
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            replacement for the linebreaks / html tags
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String the unwrapped string
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.md5"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">md5</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function calculates the md5 hash of a string</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String md5 hash of the string
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.repeat"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">repeat</span>(<span class="signature">Int</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function repeats a string the specified amount of times</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Int
                        </td>
                        <td>
                            amount of repetitions
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String resulting string
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.startsWith"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">startsWith</span>(<span class="signature">String</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function returns true if the string starts with
the string passed as argument</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            string pattern to search for
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Boolean true in case it matches the beginning
           of the string, false otherwise
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.endsWith"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">endsWith</span>(<span class="signature">String</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function returns true if the string ends with
the string passed as argument</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            string pattern to search for
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Boolean true in case it matches the end of
           the string, false otherwise
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.pad"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">pad</span>(<span class="signature">String, Number, Number</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">fills a string with another string up to a desired length</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            the filling string
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Number
                        </td>
                        <td>
                            the desired length of the resulting string
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Number
                        </td>
                        <td>
                            the direction which the string will be padded in:
                   -1: left    0: both (balance)  1: right
                   (you can use the constants String.LEFT,
                    String.BALANCE and String.RIGHT here as well.)
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String the resulting string
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.contains"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">contains</span>(<span class="signature">String, Int, Boolean</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function returns true if a string contains the string
passed as argument</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            string to search for
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Int
                        </td>
                        <td>
                            Position to start search
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Boolean
                        </td>
                        <td>
                            
                        </td> 
                    </tr>
                
                </table>
                
                
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.diff"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">diff</span>(<span class="signature">String, String</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">function compares a string with the one passed as argument
using diff</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            String to compare against String object value
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            Optional regular expression string to use for 
                splitting. If not defined, newlines will be used.
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Object Array containing one JS object for each line
                    with the following properties:
                    .num Line number
                    .value String line if unchanged
                    .deleted Obj Array containing deleted lines
                    .inserted Obj Array containing added lines
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.trim"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">trim</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">remove leading and trailing whitespace</div>
                

                
                
                
                
                
                
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.isEmail"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">isEmail</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">returns true if the string looks like an e-mail</div>
                

                
                
                
                
                
                
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.count"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">count</span>(<span class="signature">str</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">returns the amount of occurences of one string in another</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            str
                        </td>
                        <td>
                            
                        </td> 
                    </tr>
                
                </table>
                
                
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.enbase64"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">enbase64</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">returns the string encoded using the base64 algorithm</div>
                

                
                
                
                
                
                
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.debase64"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">debase64</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">returns the decoded string using the base64 algorithm</div>
                

                
                
                
                
                
                
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.Sorter"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">Sorter</span>(<span class="signature">String, Number</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">factory to create functions for sorting objects in an array</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            name of the field each object is compared with
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Number
                        </td>
                        <td>
                            order (ascending or descending)
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            Function ready for use in Array.prototype.sort
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.compose"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">compose</span>(<span class="signature">String</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">create a string from a bunch of substrings</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            one or more strings as arguments
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String the resulting string
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.random"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">random</span>(<span class="signature">len, mode</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">creates a random string (numbers and chars)</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            len
                        </td>
                        <td>
                            length of key
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            mode
                        </td>
                        <td>
                            determines which letters to use. null or 0 = all letters;
     1 = skip 0, 1, l and o which can easily be mixed with numbers;
     2 = use numbers only
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            random string
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="String.join"></a>
                    
                    
                        <i><a href="#String" class="type">String</a>.
                        <span class="symbolname">join</span>(<span class="signature">String, String, String</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">append one string onto another and add some "glue"
if none of the strings is empty or null.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            the first string
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            the string to be appended onto the first one
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String
                        </td>
                        <td>
                            the "glue" to be inserted between both strings
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            String the resulting string
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
        </div>
    </div>
    <div class="finePrint">
    Fri, 05 Feb 2010 17:40:05 GMT.
    </div>

<script> closebox() </script>

<script> openbox('pageintro') </script>

    <h3>core framework</h3>
        <ul>            
            <li><a href="global.html">global</a></li>
            <li><a href="app.html">app (application)</a></li>
            <li><a href="req.html">req (request)</a></li>
            <li><a href="res.html">res (response)</a></li>
            <li><a href="session.html">session</a></li>
            <li><a href="global.html#path">path</a></li>
            <li><a href="global.html#root">root</a></li>
            <li><a href="HopObject.html">HopObject</a></li>
            <li><a href="User.html">User</a></li>
            <li><a href="File.html">File</a></li>
            <li><a href="FtpClient.html">FtpClient</a></li>
            <li><a href="Image.html">Image</a></li>
            <li><a href="Mail.html">Mail</a></li>
            <li><a href="global.html#Remote">Remote</a></li>
            <li><a href="Xml.html">Xml</a></li>
            <li><a href="DatabaseObject.html">DatabaseObject</a></li>
            <li><a href="MimePart.html">MimePart</a></li>
            <li><a href="Skin.html">Skin</a></li>
            <li><a href="global.html#Object.dontEnum">Object</a></li>
        </ul>
        
    <h3>optional modules</h3>
        <ul>            
            <li><a href="ArrayExtensions.html">Array extensions</a></li>
            <li><a href="DateExtensions.html">Date extensions</a></li>
            <li><a href="NumberExtensions.html">Number extensions</a></li>
            <li><a href="ObjectExtensions.html">Object extensions</a></li>
            <li><a href="StringExtensions.html">String extensions</a></li>
            <li><a href="HopObjectExtensions.html">HopObject extensions</a></li>
            <li><a href="GlobalMacros.html">global macros</a></li>
            <li><a href="MacroFilters.html">macro filters</a></li>
            <li><a href="JSON.html">JSON methods</a></li>
            <br />
            <li><a href="helma.Aspects.html">helma.Aspects</a></li>
            <li><a href="helma.Chart.html">helma.Chart</a></li>
            <li><a href="helma.Color.html">helma.Color</a></li>
            <li><a href="helma.Database.html">helma.Database</a></li>
            <li><a href="helma.File.html">helma.File</a></li>
            <li><a href="helma.Ftp.html">helma.Ftp</a></li>
            <li><a href="helma.Group.html">helma.Group</a></li>
            <li><a href="helma.Html.html">helma.Html</a></li>
            <li><a href="helma.Http.html">helma.Http</a></li>
            <li><a href="helma.Image.html">helma.Image</a></li>
            <li><a href="helma.Mail.html">helma.Mail</a></li>
            <li><a href="helma.Search.html">helma.Search</a></li>
            <li><a href="helma.Skin.html">helma.Skin</a></li>
            <li><a href="helma.Ssh.html">helma.Ssh</a></li>
            <li><a href="helma.Url.html">helma.Url</a></li>
            <li><a href="helma.Zip.html">helma.Zip</a></li>
            <br />
            <li><a href="jala.BitTorrent.html">jala.BitTorrent</a></li>
            <li><a href="jala.Captcha.html">jala.Captcha</a></li>
            <li><a href="jala.Date.html">jala.Date</a></li>
            <li><a href="jala.db.html">jala.db</a></li>
            <li><a href="jala.DnsClient.html">jala.DnsClient</a></li>
            <li><a href="jala.Form.html">jala.Form</a></li>
            <li><a href="jala.History.html">jala.History</a></li>
            <li><a href="jala.HopObjectExtensions.html">jala HopObject extensions</a></li>
            <li><a href="jala.HtmlDocument.html">jala.HtmlDocument</a></li>
            <li><a href="jala.I18n.html">jala.I18n</a></li>
            <li><a href="jala.ImageFilter.html">jala.ImageFilter</a></li>
            <li><a href="jala.IndexManager.html">jala.IndexManager</a></li>
            <li><a href="jala.ListRenderer.html">jala.ListRenderer</a></li>
            <li><a href="jala.Mp3.html">jala.Mp3</a></li>
            <li><a href="jala.PodcastWriter.html">jala.PodcastWriter</a></li>
            <li><a href="jala.RemoteContent.html">jala.RemoteContent</a></li>
            <li><a href="jala.Rss20Writer.html">jala.Rss20Writer</a></li>
            <li><a href="jala.Utilities.html">jala.Utilities</a></li>
            <li><a href="jala.XmlRpcRequest.html">jala.XmlRpcRequest</a></li>
            <li><a href="jala.XmlWriter.html">jala.XmlWriter</a></li>
        </ul>
    
    <h3>java libraries</h3>
        <ul>            
            <li><a href="http://www.docjar.org/">docjar search</a></li>
        </ul>

    <h3>properties files</h3>
        <ul>            
            <li><a href="http://dev.helma.org/docs/Properties+Files/apps.properties/">apps.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Properties+Files/app.properties/">app.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Properties+Files/server.properties/">server.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Properties+Files/db.properties/">db.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Properties+Files/class.properties/">class.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Type.properties+Documentation/">type.properties</a></li>
         </ul>
    
<script> closebox() </script>

</div>
<br clear="all" /><br /><br />



</body>
</html>
